package hfjava;

public class Redefine_6 {
    public static void main(String[] args) {
        int basic1=1;
        int basic2=1;
        for (int i = 3; i <31 ; i++) {

          int num=basic1+basic2;
          basic1=basic2;
          basic2=num;
          if (i==30){
              System.out.println("第30位："+num);
          }
        }
          /* int[] num=new int[31];
        num[0]=1;
        num[1]=1;
        for (int i = 3; i <31 ; i++) {
            num[i]=num[i-2]+num[i-1];
         if (i==30){
          System.out.println("第30位："+num[30]);
         }
        }*/


    }
}
